using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Input.Touch;
using Microsoft.Xna.Framework.Media;

namespace ChildrenOfWar
{
    class COW_ObstacleSQ : COW_Obstacle
    {
        public List<Vector2> Corners;
        public Vector2 position;
        public Vector2 dimensions;

        /// <summary>
        /// Don't use the default case. The default case is stupid. And bad.
        /// </summary>
        public COW_ObstacleSQ()
        {
            position = new Vector2(0, 0);
            dimensions = new Vector2(0, 0);
            Corners.Add(new Vector2(0, 0));
            Corners.Add(new Vector2(0, 0));
            Corners.Add(new Vector2(0, 0));
            Corners.Add(new Vector2(0, 0));
        }

        /// <summary>
        /// Creates an Obstacle at the given position with the given dimensions.
        /// </summary>
        /// <param name="pos">Position of top left corner.</param>
        /// <param name="dim">Dimensions of the obstacle.</param>
        public COW_ObstacleSQ(Vector2 pos, Vector2 dim)
        {
            position = pos;
            dimensions = dim;
            Corners.Add(pos);
            Corners.Add(new Vector2(pos.X, pos.Y + dim.Y));
            Corners.Add(new Vector2(pos.X + dim.X, pos.Y));
            Corners.Add(new Vector2(pos.X + dim.X, pos.Y + dim.Y));
        }
    }
}